#ifndef HTTPRESPONSE_H
#define HTTPRESPONSE_H
#include "ServerStruct.h"

Response *create_response();
void      reset_response(Response *response);
void      free_response(Response *response);
void      set_response_status(Response *response, int status);
void      set_response_header(Response *response, char *key, char *value);
void      set_response_body(Response *response, char *body);
void      set_response_content_type(Response *response, char *content_type);

int  do_response(EventLoop *el, Client *client);
void generate_response(Client *client);
void set_async_response(Response *resp, int (*callback)(Client *client));
int  async_response_callback(Client *client);
void async_send_response(Client *client);

#endif // HTTPRESPONSE_H
